﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vit.Data
{
    public class SqlFrom : SqlClause
    {
        public SqlFrom()
        {
            Objects = new List<SqlObject>();
        }

        public List<SqlObject> Objects { get; set; }

        public override string ToSql()
        {
            StringBuilder sb = new StringBuilder("FROM ");
            foreach (var obj in Objects)
                sb.Append(obj.ToSql()).Append(",");
            sb.Remove(sb.Length - 1, 1);

            return sb.ToString();
        }
    }
}
